package pojo.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSessionFactory;

import pojo.bean.Stage;
import pojo.mapper.StageMapper;

public class StageDAO extends AbstractMapperDAO implements StageMapper {
    private StageMapper mapper;
    
    public StageDAO(SqlSessionFactory factory) {
        super(factory);
        mapper = session.getMapper(StageMapper.class);
    }

    @Override
    public int deleteByPrimaryKey(int stageId) {
        // TODO 自动生成的方法存根
        return 0;
    }

    @Override
    public int insert(Stage record) {
        // TODO 自动生成的方法存根
        return 0;
    }

    @Override
    public int insertSelective(Stage record) {
        // TODO 自动生成的方法存根
        return 0;
    }

    @Override
    public Stage selectByPrimaryKey(int stageId) {
        // TODO 自动生成的方法存根
        return null;
    }

    @Override
    public List<Stage> selectAll() {
        List<Stage> stages;
        try {
            stages = mapper.selectAll();
        } catch (Exception e) {
            stages = null;
            e.printStackTrace();
        }
        return stages;
    }

    @Override
    public int updateByPrimaryKeySelective(Stage record) {
        // TODO 自动生成的方法存根
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Stage record) {
        // TODO 自动生成的方法存根
        return 0;
    }

}
